package com.hcmus.facebook;

import java.util.ArrayList;

import android.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.hcmus.armobile.R.id;
import com.hcmus.armobile.R.layout;
import common.Promotion;
import common.PromotionImage;

public class MainFace extends Activity{

	private EditText txtText;
	private Button btnShare;
	
	@Override
	protected void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		
	
		setContentView(com.hcmus.armobile.R.layout.activity_main);
			
			txtText = (EditText)findViewById(id.txtText);
			btnShare = (Button) findViewById(id.btnShare);
			
			
			btnShare.setOnClickListener(new View.OnClickListener() {
				
				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					
					Intent i = new Intent(getApplicationContext() ,com.hcmus.facebook.MainActivity.class);				
					i.putExtra("message", txtText.getText().toString());				
					
					//ArrayList<PromotionImage> lst = new ArrayList<PromotionImage>();
					//lst.add(new PromotionImage(1, "http://myrrix.com/wp-content/uploads/2012/06/stackoverflow.png", 1));
					//Promotion promotionPost = new Promotion(1,"promotion test face" , 1, "152000", "52000", "30", 20130425, 20130530, 1500," description promotion test", lst , "");
					//i.putParcelableArrayListExtra("promotionPost", (ArrayList<? extends Parcelable>) lst);
					startActivity(i);
					
				}
			});
		
		
	}
	
}
